package nameStrategy;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.hibernate.cfg.DefaultNamingStrategy;

public class MyNameStategy extends DefaultNamingStrategy {

	@Override
	public String classToTableName(String className) {
		
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss");
		String suffix = dateFormat.format(new Date());
		return super.classToTableName(className + "_" + suffix);
	}

	@Override
	public String collectionTableName(String ownerEntity,
			String ownerEntityTable, String associatedEntity,
			String associatedEntityTable, String propertyName) {
		// TODO Auto-generated method stub
		return super.collectionTableName(ownerEntity, ownerEntityTable,
				associatedEntity, associatedEntityTable, propertyName);
	}

	@Override
	public String columnName(String columnName) {
		// TODO Auto-generated method stub
		return super.columnName(columnName);
	}

	@Override
	public String foreignKeyColumnName(String propertyName,
			String propertyEntityName, String propertyTableName,
			String referencedColumnName) {
		// TODO Auto-generated method stub
		return super.foreignKeyColumnName(propertyName, propertyEntityName,
				propertyTableName, referencedColumnName);
	}

	@Override
	public String joinKeyColumnName(String joinedColumn, String joinedTable) {
		// TODO Auto-generated method stub
		return super.joinKeyColumnName(joinedColumn, joinedTable);
	}

	@Override
	public String logicalCollectionColumnName(String columnName,
			String propertyName, String referencedColumn) {
		// TODO Auto-generated method stub
		return super.logicalCollectionColumnName(columnName, propertyName,
				referencedColumn);
	}

	@Override
	public String logicalCollectionTableName(String tableName,
			String ownerEntityTable, String associatedEntityTable,
			String propertyName) {
		// TODO Auto-generated method stub
		return super.logicalCollectionTableName(tableName, ownerEntityTable,
				associatedEntityTable, propertyName);
	}

	@Override
	public String logicalColumnName(String columnName, String propertyName) {
		// TODO Auto-generated method stub
		return super.logicalColumnName(columnName, propertyName);
	}

	@Override
	public String propertyToColumnName(String propertyName) {
		// TODO Auto-generated method stub
		return super.propertyToColumnName(propertyName);
	}

	@Override
	public String tableName(String tableName) {
		// TODO Auto-generated method stub
		return super.tableName(tableName);
	}
}
